package cn.jstars.datatocloud.common.entity;

import org.nutz.lang.Strings;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 自定义配置类
 * 
 * @author Elvish
 *
 */
@Component
@ConfigurationProperties(prefix = "custom")
public class Custom {

	private String dbPrefix;
	private String addColumnFlag;
	private String addColumnStartTime;
	private String addColumnIntervalTime;
	private String historyTaskFlag;
	private String historyTaskIntervalTime;
	private String historyTaskDayIntervalTime;

	public String getAddColumnFlag() {
		return addColumnFlag;
	}

	public void setAddColumnFlag(String addColumnFlag) {
		this.addColumnFlag = addColumnFlag;
	}

	public String getAddColumnStartTime() {
		return addColumnStartTime;
	}

	public void setAddColumnStartTime(String addColumnStartTime) {
		this.addColumnStartTime = addColumnStartTime;
	}

	public String getAddColumnIntervalTime() {
		return Strings.isBlank(addColumnIntervalTime) ? "60000" : addColumnIntervalTime;
	}

	public void setAddColumnIntervalTime(String addColumnIntervalTime) {
		this.addColumnIntervalTime = addColumnIntervalTime;
	}

	public String getHistoryTaskFlag() {
		return historyTaskFlag;
	}

	public void setHistoryTaskFlag(String historyTaskFlag) {
		this.historyTaskFlag = historyTaskFlag;
	}

	public String getHistoryTaskIntervalTime() {
		return Strings.isBlank(historyTaskIntervalTime) ? "5" : historyTaskIntervalTime;
	}

	public void setHistoryTaskIntervalTime(String historyTaskIntervalTime) {
		this.historyTaskIntervalTime = historyTaskIntervalTime;
	}

	public String getHistoryTaskDayIntervalTime() {
		return Strings.isBlank(historyTaskDayIntervalTime) ? "60000" : historyTaskDayIntervalTime;
	}

	public void setHistoryTaskDayIntervalTime(String historyTaskDayIntervalTime) {
		this.historyTaskDayIntervalTime = historyTaskDayIntervalTime;
	}

	public String getDbPrefix() {
		return dbPrefix;
	}

	public void setDbPrefix(String dbPrefix) {
		this.dbPrefix = dbPrefix;
	}

}
